package com.proton.carepatchtemp.utils;

import android.content.res.ColorStateList;
import android.support.v4.content.ContextCompat;

import com.proton.carepatchtemp.application.VCare;


//app资源操作
public class ResUtils {
    public static int getColor(int color) {

        return ContextCompat.getColor(VCare.get(), color);

    }

    public static ColorStateList getColors(int colors) {
        return ContextCompat.getColorStateList(VCare.get(), colors);
    }

    public static String getString(int resid) {
        return VCare.get().getResources().getString(resid);
    }

    public static int getDimen(int resid) {
        return VCare.get().getResources().getDimensionPixelOffset(resid);
    }
}
